GNU Radio's FUNCUBE Package
fcd_control.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2020 dl1ksv.
4 *
5 * SPDX-License-Identifier: GPL-3.0-or-later
6 */
7
8#ifndef INCLUDED_FUNCUBE_FCD_CONTROL_H
9#define INCLUDED_FUNCUBE_FCD_CONTROL_H
10
11#include <gnuradio/block.h>
12#include <funcube/api.h>
13
14namespace gr {
15namespace funcube {
16
17/*!
18 * \brief <+description of block+>
19 * \ingroup funcube
20 *
21 */
22class FUNCUBE_API fcd_control : virtual public gr::block
23{
24public:
25 typedef std::shared_ptr<fcd_control> sptr;
26
27 /*!
28 * \brief Return a shared_ptr to a new instance of funcube::fcd_control.
29 *
30 * To avoid accidental use of raw pointers, funcube::fcd_control's
31 * constructor is in a private implementation
32 * class. funcube::fcd_control::make is the public interface for
33 * creating new instances.
34 */
35 static sptr make();
36 /*! \brief Set frequency with Hz resolution.
37 * \param freq The frequency in Hz
38 *
39 * This is a convenience function that uses float parameter in
40 * order to allow using engineering notation in GRC.
41 *
42 */
43 virtual void set_freq(double freq) = 0;
44
45 /*! \brief Set LNA gain.
46 * \param gain The new gain in dB.
47 *
48 * Set the LNA gain in the FCD. Valid range is -5 to
49 * 30. Although the LNA gain in the FCD takes enumerated values
50 * corresponding to 2.5 dB steps, you can can call this method
51 * with any float value and it will be rounded to the nearest
52 * valid value.
53 *
54 * By default the LNA gain is set to 20 dB and this is a good value for
55 * most cases. In noisy areas you may try to reduce the gain.
56 */
57 virtual void set_lna_gain(float gain) = 0;
58
59 /*! \brief Set mixer gain.
60 * \param gain The new gain in dB.
61 *
62 * Set the mixer gain in the FCD. Valid values are +4 and +12 dB.
63 *
64 * By default the mixer gain is set to +12 dB and this is a good
65 * value for most cases. In noisy areas you may try to reduce
66 * the gain.
67 */
68 virtual void set_mixer_gain(float gain) = 0;
69
70 /*! \brief Set DC offset correction.
71 * \param _dci DC correction for I component (-1.0 to 1.0)
72 * \param _dcq DC correction for Q component (-1.0 to 1.0)
73 *
74 * Set DC offset correction in the device. Default is 0.0.
75 */
76 virtual void set_dc_corr(double _dci, double _dcq) = 0;
77
78 /*! \brief Set IQ phase and gain balance.
79 * \param _gain The gain correction (-1.0 to 1.0)
80 * \param _phase The phase correction (-1.0 to 1.0)
81 *
82 * Set IQ phase and gain balance in the device. The default values
83 * are 0.0 for phase and 1.0 for gain.
84 */
85 virtual void set_iq_corr(double _gain, double _phase) = 0;
86};
87
88} // namespace funcube
89} // namespace gr
90
91#endif /* INCLUDED_FUNCUBE_FCD_CONTROL_H */
#define FUNCUBE_API
Definition api.h:19
<+description of block+>
Definition fcd_control.h:23
virtual void set_lna_gain(float gain)=0
Set LNA gain.
std::shared_ptr< fcd_control > sptr
Definition fcd_control.h:25
virtual void set_freq(double freq)=0
Set frequency with Hz resolution.
virtual void set_mixer_gain(float gain)=0
Set mixer gain.
virtual void set_dc_corr(double _dci, double _dcq)=0
Set DC offset correction.
static sptr make()
Return a shared_ptr to a new instance of funcube::fcd_control.
virtual void set_iq_corr(double _gain, double _phase)=0
Set IQ phase and gain balance.
Definition fcd.h:15
Definition fcd.h:14